package com.springboot.bean.config;

import java.util.logging.Logger;

import com.springboot.bean.dao.DadDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
@Scope("prototype")
public class DadTask implements Runnable {

    static Logger logger = Logger.getLogger("DadTask.class");

    @Autowired
    DadDao dadDao;
    private String name;

    public DadTask setDadTask(String name) {
        this.name = name;
        return this;
    }


    @Override
    public void run() {


        // TODO Auto-generated method stub
        logger.info("DadTask:" + this + ";DadDao:" + dadDao + ";" + dadDao.sayhello(name));
    }
}